3.5.20 \(\int (g+h x)^3 (a+b \log (c (d (e+f x)^p)^q)) \, dx\) [420]

Optimal. Leaf size=158 \[ -\frac {b (f g-e h)^3 p q x}{4 f^3}-\frac {b (f g-e h)^2 p q (g+h x)^2}{8 f^2 h}-\frac {b (f g-e h) p q (g+h x)^3}{12 f h}-\frac {b p q (g+h x)^4}{16 h}-\frac {b (f g-e h)^4 p q \log (e+f x)}{4 f^4 h}+\frac {(g+h x)^4 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{4 h} \]

[Out]

-1/4*b*(-e*h+f*g)^3*p*q*x/f^3-1/8*b*(-e*h+f*g)^2*p*q*(h*x+g)^2/f^2/h-1/12*b*(-e*h+f*g)*p*q*(h*x+g)^3/f/h-1/16*
b*p*q*(h*x+g)^4/h-1/4*b*(-e*h+f*g)^4*p*q*ln(f*x+e)/f^4/h+1/4*(h*x+g)^4*(a+b*ln(c*(d*(f*x+e)^p)^q))/h

________________________________________________________________________________________

Rubi [A]
time = 0.12, antiderivative size = 158, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {2442, 45, 2495} \begin {gather*} \frac {(g+h x)^4 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{4 h}-\frac {b p q (f g-e h)^4 \log (e+f x)}{4 f^4 h}-\frac {b p q x (f g-e h)^3}{4 f^3}-\frac {b p q (g+h x)^2 (f g-e h)^2}{8 f^2 h}-\frac {b p q (g+h x)^3 (f g-e h)}{12 f h}-\frac {b p q (g+h x)^4}{16 h} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(g + h*x)^3*(a + b*Log[c*(d*(e + f*x)^p)^q]),x]

[Out]

-1/4*(b*(f*g - e*h)^3*p*q*x)/f^3 - (b*(f*g - e*h)^2*p*q*(g + h*x)^2)/(8*f^2*h) - (b*(f*g - e*h)*p*q*(g + h*x)^
3)/(12*f*h) - (b*p*q*(g + h*x)^4)/(16*h) - (b*(f*g - e*h)^4*p*q*Log[e + f*x])/(4*f^4*h) + ((g + h*x)^4*(a + b*
Log[c*(d*(e + f*x)^p)^q]))/(4*h)

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2442

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[(f + g*
x)^(q + 1)*((a + b*Log[c*(d + e*x)^n])/(g*(q + 1))), x] - Dist[b*e*(n/(g*(q + 1))), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 2495

Int[((a_.) + Log[(c_.)*((d_.)*((e_.) + (f_.)*(x_))^(m_.))^(n_)]*(b_.))^(p_.)*(u_.), x_Symbol] :> Subst[Int[u*(
a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x], c*d^n*(e + f*x)^(m*n), c*(d*(e + f*x)^m)^n] /; FreeQ[{a, b, c, d, e,
f, m, n, p}, x] &&  !IntegerQ[n] &&  !(EqQ[d, 1] && EqQ[m, 1]) && IntegralFreeQ[IntHide[u*(a + b*Log[c*d^n*(e
+ f*x)^(m*n)])^p, x]]

Rubi steps

\begin {align*} \int (g+h x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \, dx &=\text {Subst}\left (\int (g+h x)^3 \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right ) \, dx,c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac {(g+h x)^4 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{4 h}-\text {Subst}\left (\frac {(b f p q) \int \frac {(g+h x)^4}{e+f x} \, dx}{4 h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac {(g+h x)^4 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{4 h}-\text {Subst}\left (\frac {(b f p q) \int \left (\frac {h (f g-e h)^3}{f^4}+\frac {(f g-e h)^4}{f^4 (e+f x)}+\frac {h (f g-e h)^2 (g+h x)}{f^3}+\frac {h (f g-e h) (g+h x)^2}{f^2}+\frac {h (g+h x)^3}{f}\right ) \, dx}{4 h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac {b (f g-e h)^3 p q x}{4 f^3}-\frac {b (f g-e h)^2 p q (g+h x)^2}{8 f^2 h}-\frac {b (f g-e h) p q (g+h x)^3}{12 f h}-\frac {b p q (g+h x)^4}{16 h}-\frac {b (f g-e h)^4 p q \log (e+f x)}{4 f^4 h}+\frac {(g+h x)^4 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{4 h}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.18, size = 233, normalized size = 1.47 \begin {gather*} \frac {-12 b e \left (-4 f^3 g^3+6 e f^2 g^2 h-4 e^2 f g h^2+e^3 h^3\right ) p q \log (e+f x)+f x \left (12 a f^3 \left (4 g^3+6 g^2 h x+4 g h^2 x^2+h^3 x^3\right )-b p q \left (-12 e^3 h^3+6 e^2 f h^2 (8 g+h x)-4 e f^2 h \left (18 g^2+6 g h x+h^2 x^2\right )+f^3 \left (48 g^3+36 g^2 h x+16 g h^2 x^2+3 h^3 x^3\right )\right )+12 b f^3 \left (4 g^3+6 g^2 h x+4 g h^2 x^2+h^3 x^3\right ) \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{48 f^4} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(g + h*x)^3*(a + b*Log[c*(d*(e + f*x)^p)^q]),x]

[Out]

(-12*b*e*(-4*f^3*g^3 + 6*e*f^2*g^2*h - 4*e^2*f*g*h^2 + e^3*h^3)*p*q*Log[e + f*x] + f*x*(12*a*f^3*(4*g^3 + 6*g^
2*h*x + 4*g*h^2*x^2 + h^3*x^3) - b*p*q*(-12*e^3*h^3 + 6*e^2*f*h^2*(8*g + h*x) - 4*e*f^2*h*(18*g^2 + 6*g*h*x +
h^2*x^2) + f^3*(48*g^3 + 36*g^2*h*x + 16*g*h^2*x^2 + 3*h^3*x^3)) + 12*b*f^3*(4*g^3 + 6*g^2*h*x + 4*g*h^2*x^2 +
 h^3*x^3)*Log[c*(d*(e + f*x)^p)^q]))/(48*f^4)

________________________________________________________________________________________

Maple [F]
time = 0.17, size = 0, normalized size = 0.00 \[\int \left (h x +g \right )^{3} \left (a +b \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right )\right )\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((h*x+g)^3*(a+b*ln(c*(d*(f*x+e)^p)^q)),x)

[Out]

int((h*x+g)^3*(a+b*ln(c*(d*(f*x+e)^p)^q)),x)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 309 vs. \(2 (152) = 304\).
time = 0.32, size = 309, normalized size = 1.96 \begin {gather*} \frac {1}{4} \, b h^{3} x^{4} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + \frac {1}{4} \, a h^{3} x^{4} - b f g^{3} p q {\left (\frac {x}{f} - \frac {e \log \left (f x + e\right )}{f^{2}}\right )} - \frac {3}{4} \, b f g^{2} h p q {\left (\frac {f x^{2} - 2 \, x e}{f^{2}} + \frac {2 \, e^{2} \log \left (f x + e\right )}{f^{3}}\right )} - \frac {1}{6} \, b f g h^{2} p q {\left (\frac {2 \, f^{2} x^{3} - 3 \, f x^{2} e + 6 \, x e^{2}}{f^{3}} - \frac {6 \, e^{3} \log \left (f x + e\right )}{f^{4}}\right )} - \frac {1}{48} \, b f h^{3} p q {\left (\frac {3 \, f^{3} x^{4} - 4 \, f^{2} x^{3} e + 6 \, f x^{2} e^{2} - 12 \, x e^{3}}{f^{4}} + \frac {12 \, e^{4} \log \left (f x + e\right )}{f^{5}}\right )} + b g h^{2} x^{3} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a g h^{2} x^{3} + \frac {3}{2} \, b g^{2} h x^{2} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + \frac {3}{2} \, a g^{2} h x^{2} + b g^{3} x \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a g^{3} x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^3*(a+b*log(c*(d*(f*x+e)^p)^q)),x, algorithm="maxima")

[Out]

1/4*b*h^3*x^4*log(((f*x + e)^p*d)^q*c) + 1/4*a*h^3*x^4 - b*f*g^3*p*q*(x/f - e*log(f*x + e)/f^2) - 3/4*b*f*g^2*
h*p*q*((f*x^2 - 2*x*e)/f^2 + 2*e^2*log(f*x + e)/f^3) - 1/6*b*f*g*h^2*p*q*((2*f^2*x^3 - 3*f*x^2*e + 6*x*e^2)/f^
3 - 6*e^3*log(f*x + e)/f^4) - 1/48*b*f*h^3*p*q*((3*f^3*x^4 - 4*f^2*x^3*e + 6*f*x^2*e^2 - 12*x*e^3)/f^4 + 12*e^
4*log(f*x + e)/f^5) + b*g*h^2*x^3*log(((f*x + e)^p*d)^q*c) + a*g*h^2*x^3 + 3/2*b*g^2*h*x^2*log(((f*x + e)^p*d)
^q*c) + 3/2*a*g^2*h*x^2 + b*g^3*x*log(((f*x + e)^p*d)^q*c) + a*g^3*x

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 419 vs. \(2 (152) = 304\).
time = 0.35, size = 419, normalized size = 2.65 \begin {gather*} \frac {12 \, b f h^{3} p q x e^{3} - 3 \, {\left (b f^{4} h^{3} p q - 4 \, a f^{4} h^{3}\right )} x^{4} - 16 \, {\left (b f^{4} g h^{2} p q - 3 \, a f^{4} g h^{2}\right )} x^{3} - 36 \, {\left (b f^{4} g^{2} h p q - 2 \, a f^{4} g^{2} h\right )} x^{2} - 48 \, {\left (b f^{4} g^{3} p q - a f^{4} g^{3}\right )} x - 6 \, {\left (b f^{2} h^{3} p q x^{2} + 8 \, b f^{2} g h^{2} p q x\right )} e^{2} + 4 \, {\left (b f^{3} h^{3} p q x^{3} + 6 \, b f^{3} g h^{2} p q x^{2} + 18 \, b f^{3} g^{2} h p q x\right )} e + 12 \, {\left (b f^{4} h^{3} p q x^{4} + 4 \, b f^{4} g h^{2} p q x^{3} + 6 \, b f^{4} g^{2} h p q x^{2} + 4 \, b f^{4} g^{3} p q x + 4 \, b f^{3} g^{3} p q e - 6 \, b f^{2} g^{2} h p q e^{2} + 4 \, b f g h^{2} p q e^{3} - b h^{3} p q e^{4}\right )} \log \left (f x + e\right ) + 12 \, {\left (b f^{4} h^{3} x^{4} + 4 \, b f^{4} g h^{2} x^{3} + 6 \, b f^{4} g^{2} h x^{2} + 4 \, b f^{4} g^{3} x\right )} \log \left (c\right ) + 12 \, {\left (b f^{4} h^{3} q x^{4} + 4 \, b f^{4} g h^{2} q x^{3} + 6 \, b f^{4} g^{2} h q x^{2} + 4 \, b f^{4} g^{3} q x\right )} \log \left (d\right )}{48 \, f^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^3*(a+b*log(c*(d*(f*x+e)^p)^q)),x, algorithm="fricas")

[Out]

1/48*(12*b*f*h^3*p*q*x*e^3 - 3*(b*f^4*h^3*p*q - 4*a*f^4*h^3)*x^4 - 16*(b*f^4*g*h^2*p*q - 3*a*f^4*g*h^2)*x^3 -
36*(b*f^4*g^2*h*p*q - 2*a*f^4*g^2*h)*x^2 - 48*(b*f^4*g^3*p*q - a*f^4*g^3)*x - 6*(b*f^2*h^3*p*q*x^2 + 8*b*f^2*g
*h^2*p*q*x)*e^2 + 4*(b*f^3*h^3*p*q*x^3 + 6*b*f^3*g*h^2*p*q*x^2 + 18*b*f^3*g^2*h*p*q*x)*e + 12*(b*f^4*h^3*p*q*x
^4 + 4*b*f^4*g*h^2*p*q*x^3 + 6*b*f^4*g^2*h*p*q*x^2 + 4*b*f^4*g^3*p*q*x + 4*b*f^3*g^3*p*q*e - 6*b*f^2*g^2*h*p*q
*e^2 + 4*b*f*g*h^2*p*q*e^3 - b*h^3*p*q*e^4)*log(f*x + e) + 12*(b*f^4*h^3*x^4 + 4*b*f^4*g*h^2*x^3 + 6*b*f^4*g^2
*h*x^2 + 4*b*f^4*g^3*x)*log(c) + 12*(b*f^4*h^3*q*x^4 + 4*b*f^4*g*h^2*q*x^3 + 6*b*f^4*g^2*h*q*x^2 + 4*b*f^4*g^3
*q*x)*log(d))/f^4

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 457 vs. \(2 (139) = 278\).
time = 2.96, size = 457, normalized size = 2.89 \begin {gather*} \begin {cases} a g^{3} x + \frac {3 a g^{2} h x^{2}}{2} + a g h^{2} x^{3} + \frac {a h^{3} x^{4}}{4} - \frac {b e^{4} h^{3} \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}}{4 f^{4}} + \frac {b e^{3} g h^{2} \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}}{f^{3}} + \frac {b e^{3} h^{3} p q x}{4 f^{3}} - \frac {3 b e^{2} g^{2} h \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}}{2 f^{2}} - \frac {b e^{2} g h^{2} p q x}{f^{2}} - \frac {b e^{2} h^{3} p q x^{2}}{8 f^{2}} + \frac {b e g^{3} \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}}{f} + \frac {3 b e g^{2} h p q x}{2 f} + \frac {b e g h^{2} p q x^{2}}{2 f} + \frac {b e h^{3} p q x^{3}}{12 f} - b g^{3} p q x + b g^{3} x \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )} - \frac {3 b g^{2} h p q x^{2}}{4} + \frac {3 b g^{2} h x^{2} \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}}{2} - \frac {b g h^{2} p q x^{3}}{3} + b g h^{2} x^{3} \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )} - \frac {b h^{3} p q x^{4}}{16} + \frac {b h^{3} x^{4} \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}}{4} & \text {for}\: f \neq 0 \\\left (a + b \log {\left (c \left (d e^{p}\right )^{q} \right )}\right ) \left (g^{3} x + \frac {3 g^{2} h x^{2}}{2} + g h^{2} x^{3} + \frac {h^{3} x^{4}}{4}\right ) & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)**3*(a+b*ln(c*(d*(f*x+e)**p)**q)),x)

[Out]

Piecewise((a*g**3*x + 3*a*g**2*h*x**2/2 + a*g*h**2*x**3 + a*h**3*x**4/4 - b*e**4*h**3*log(c*(d*(e + f*x)**p)**
q)/(4*f**4) + b*e**3*g*h**2*log(c*(d*(e + f*x)**p)**q)/f**3 + b*e**3*h**3*p*q*x/(4*f**3) - 3*b*e**2*g**2*h*log
(c*(d*(e + f*x)**p)**q)/(2*f**2) - b*e**2*g*h**2*p*q*x/f**2 - b*e**2*h**3*p*q*x**2/(8*f**2) + b*e*g**3*log(c*(
d*(e + f*x)**p)**q)/f + 3*b*e*g**2*h*p*q*x/(2*f) + b*e*g*h**2*p*q*x**2/(2*f) + b*e*h**3*p*q*x**3/(12*f) - b*g*
*3*p*q*x + b*g**3*x*log(c*(d*(e + f*x)**p)**q) - 3*b*g**2*h*p*q*x**2/4 + 3*b*g**2*h*x**2*log(c*(d*(e + f*x)**p
)**q)/2 - b*g*h**2*p*q*x**3/3 + b*g*h**2*x**3*log(c*(d*(e + f*x)**p)**q) - b*h**3*p*q*x**4/16 + b*h**3*x**4*lo
g(c*(d*(e + f*x)**p)**q)/4, Ne(f, 0)), ((a + b*log(c*(d*e**p)**q))*(g**3*x + 3*g**2*h*x**2/2 + g*h**2*x**3 + h
**3*x**4/4), True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 1047 vs. \(2 (152) = 304\).
time = 6.28, size = 1047, normalized size = 6.63 \begin {gather*} \frac {{\left (f x + e\right )} b g^{3} p q \log \left (f x + e\right )}{f} + \frac {3 \, {\left (f x + e\right )}^{2} b g^{2} h p q \log \left (f x + e\right )}{2 \, f^{2}} + \frac {{\left (f x + e\right )}^{3} b g h^{2} p q \log \left (f x + e\right )}{f^{3}} + \frac {{\left (f x + e\right )}^{4} b h^{3} p q \log \left (f x + e\right )}{4 \, f^{4}} - \frac {3 \, {\left (f x + e\right )} b g^{2} h p q e \log \left (f x + e\right )}{f^{2}} - \frac {3 \, {\left (f x + e\right )}^{2} b g h^{2} p q e \log \left (f x + e\right )}{f^{3}} - \frac {{\left (f x + e\right )}^{3} b h^{3} p q e \log \left (f x + e\right )}{f^{4}} - \frac {{\left (f x + e\right )} b g^{3} p q}{f} - \frac {3 \, {\left (f x + e\right )}^{2} b g^{2} h p q}{4 \, f^{2}} - \frac {{\left (f x + e\right )}^{3} b g h^{2} p q}{3 \, f^{3}} - \frac {{\left (f x + e\right )}^{4} b h^{3} p q}{16 \, f^{4}} + \frac {3 \, {\left (f x + e\right )} b g^{2} h p q e}{f^{2}} + \frac {3 \, {\left (f x + e\right )}^{2} b g h^{2} p q e}{2 \, f^{3}} + \frac {{\left (f x + e\right )}^{3} b h^{3} p q e}{3 \, f^{4}} + \frac {3 \, {\left (f x + e\right )} b g h^{2} p q e^{2} \log \left (f x + e\right )}{f^{3}} + \frac {3 \, {\left (f x + e\right )}^{2} b h^{3} p q e^{2} \log \left (f x + e\right )}{2 \, f^{4}} + \frac {{\left (f x + e\right )} b g^{3} q \log \left (d\right )}{f} + \frac {3 \, {\left (f x + e\right )}^{2} b g^{2} h q \log \left (d\right )}{2 \, f^{2}} + \frac {{\left (f x + e\right )}^{3} b g h^{2} q \log \left (d\right )}{f^{3}} + \frac {{\left (f x + e\right )}^{4} b h^{3} q \log \left (d\right )}{4 \, f^{4}} - \frac {3 \, {\left (f x + e\right )} b g^{2} h q e \log \left (d\right )}{f^{2}} - \frac {3 \, {\left (f x + e\right )}^{2} b g h^{2} q e \log \left (d\right )}{f^{3}} - \frac {{\left (f x + e\right )}^{3} b h^{3} q e \log \left (d\right )}{f^{4}} - \frac {3 \, {\left (f x + e\right )} b g h^{2} p q e^{2}}{f^{3}} - \frac {3 \, {\left (f x + e\right )}^{2} b h^{3} p q e^{2}}{4 \, f^{4}} - \frac {{\left (f x + e\right )} b h^{3} p q e^{3} \log \left (f x + e\right )}{f^{4}} + \frac {{\left (f x + e\right )} b g^{3} \log \left (c\right )}{f} + \frac {3 \, {\left (f x + e\right )}^{2} b g^{2} h \log \left (c\right )}{2 \, f^{2}} + \frac {{\left (f x + e\right )}^{3} b g h^{2} \log \left (c\right )}{f^{3}} + \frac {{\left (f x + e\right )}^{4} b h^{3} \log \left (c\right )}{4 \, f^{4}} - \frac {3 \, {\left (f x + e\right )} b g^{2} h e \log \left (c\right )}{f^{2}} - \frac {3 \, {\left (f x + e\right )}^{2} b g h^{2} e \log \left (c\right )}{f^{3}} - \frac {{\left (f x + e\right )}^{3} b h^{3} e \log \left (c\right )}{f^{4}} + \frac {3 \, {\left (f x + e\right )} b g h^{2} q e^{2} \log \left (d\right )}{f^{3}} + \frac {3 \, {\left (f x + e\right )}^{2} b h^{3} q e^{2} \log \left (d\right )}{2 \, f^{4}} + \frac {{\left (f x + e\right )} a g^{3}}{f} + \frac {3 \, {\left (f x + e\right )}^{2} a g^{2} h}{2 \, f^{2}} + \frac {{\left (f x + e\right )}^{3} a g h^{2}}{f^{3}} + \frac {{\left (f x + e\right )}^{4} a h^{3}}{4 \, f^{4}} + \frac {{\left (f x + e\right )} b h^{3} p q e^{3}}{f^{4}} - \frac {3 \, {\left (f x + e\right )} a g^{2} h e}{f^{2}} - \frac {3 \, {\left (f x + e\right )}^{2} a g h^{2} e}{f^{3}} - \frac {{\left (f x + e\right )}^{3} a h^{3} e}{f^{4}} + \frac {3 \, {\left (f x + e\right )} b g h^{2} e^{2} \log \left (c\right )}{f^{3}} + \frac {3 \, {\left (f x + e\right )}^{2} b h^{3} e^{2} \log \left (c\right )}{2 \, f^{4}} - \frac {{\left (f x + e\right )} b h^{3} q e^{3} \log \left (d\right )}{f^{4}} + \frac {3 \, {\left (f x + e\right )} a g h^{2} e^{2}}{f^{3}} + \frac {3 \, {\left (f x + e\right )}^{2} a h^{3} e^{2}}{2 \, f^{4}} - \frac {{\left (f x + e\right )} b h^{3} e^{3} \log \left (c\right )}{f^{4}} - \frac {{\left (f x + e\right )} a h^{3} e^{3}}{f^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^3*(a+b*log(c*(d*(f*x+e)^p)^q)),x, algorithm="giac")

[Out]

(f*x + e)*b*g^3*p*q*log(f*x + e)/f + 3/2*(f*x + e)^2*b*g^2*h*p*q*log(f*x + e)/f^2 + (f*x + e)^3*b*g*h^2*p*q*lo
g(f*x + e)/f^3 + 1/4*(f*x + e)^4*b*h^3*p*q*log(f*x + e)/f^4 - 3*(f*x + e)*b*g^2*h*p*q*e*log(f*x + e)/f^2 - 3*(
f*x + e)^2*b*g*h^2*p*q*e*log(f*x + e)/f^3 - (f*x + e)^3*b*h^3*p*q*e*log(f*x + e)/f^4 - (f*x + e)*b*g^3*p*q/f -
 3/4*(f*x + e)^2*b*g^2*h*p*q/f^2 - 1/3*(f*x + e)^3*b*g*h^2*p*q/f^3 - 1/16*(f*x + e)^4*b*h^3*p*q/f^4 + 3*(f*x +
 e)*b*g^2*h*p*q*e/f^2 + 3/2*(f*x + e)^2*b*g*h^2*p*q*e/f^3 + 1/3*(f*x + e)^3*b*h^3*p*q*e/f^4 + 3*(f*x + e)*b*g*
h^2*p*q*e^2*log(f*x + e)/f^3 + 3/2*(f*x + e)^2*b*h^3*p*q*e^2*log(f*x + e)/f^4 + (f*x + e)*b*g^3*q*log(d)/f + 3
/2*(f*x + e)^2*b*g^2*h*q*log(d)/f^2 + (f*x + e)^3*b*g*h^2*q*log(d)/f^3 + 1/4*(f*x + e)^4*b*h^3*q*log(d)/f^4 -
3*(f*x + e)*b*g^2*h*q*e*log(d)/f^2 - 3*(f*x + e)^2*b*g*h^2*q*e*log(d)/f^3 - (f*x + e)^3*b*h^3*q*e*log(d)/f^4 -
 3*(f*x + e)*b*g*h^2*p*q*e^2/f^3 - 3/4*(f*x + e)^2*b*h^3*p*q*e^2/f^4 - (f*x + e)*b*h^3*p*q*e^3*log(f*x + e)/f^
4 + (f*x + e)*b*g^3*log(c)/f + 3/2*(f*x + e)^2*b*g^2*h*log(c)/f^2 + (f*x + e)^3*b*g*h^2*log(c)/f^3 + 1/4*(f*x
+ e)^4*b*h^3*log(c)/f^4 - 3*(f*x + e)*b*g^2*h*e*log(c)/f^2 - 3*(f*x + e)^2*b*g*h^2*e*log(c)/f^3 - (f*x + e)^3*
b*h^3*e*log(c)/f^4 + 3*(f*x + e)*b*g*h^2*q*e^2*log(d)/f^3 + 3/2*(f*x + e)^2*b*h^3*q*e^2*log(d)/f^4 + (f*x + e)
*a*g^3/f + 3/2*(f*x + e)^2*a*g^2*h/f^2 + (f*x + e)^3*a*g*h^2/f^3 + 1/4*(f*x + e)^4*a*h^3/f^4 + (f*x + e)*b*h^3
*p*q*e^3/f^4 - 3*(f*x + e)*a*g^2*h*e/f^2 - 3*(f*x + e)^2*a*g*h^2*e/f^3 - (f*x + e)^3*a*h^3*e/f^4 + 3*(f*x + e)
*b*g*h^2*e^2*log(c)/f^3 + 3/2*(f*x + e)^2*b*h^3*e^2*log(c)/f^4 - (f*x + e)*b*h^3*q*e^3*log(d)/f^4 + 3*(f*x + e
)*a*g*h^2*e^2/f^3 + 3/2*(f*x + e)^2*a*h^3*e^2/f^4 - (f*x + e)*b*h^3*e^3*log(c)/f^4 - (f*x + e)*a*h^3*e^3/f^4

________________________________________________________________________________________

Mupad [B]
time = 0.42, size = 370, normalized size = 2.34 \begin {gather*} \ln \left (c\,{\left (d\,{\left (e+f\,x\right )}^p\right )}^q\right )\,\left (b\,g^3\,x+\frac {3\,b\,g^2\,h\,x^2}{2}+b\,g\,h^2\,x^3+\frac {b\,h^3\,x^4}{4}\right )-x^2\,\left (\frac {e\,\left (\frac {h^2\,\left (a\,e\,h+3\,a\,f\,g-b\,f\,g\,p\,q\right )}{f}-\frac {e\,h^3\,\left (4\,a-b\,p\,q\right )}{4\,f}\right )}{2\,f}-\frac {3\,g\,h\,\left (2\,a\,e\,h+2\,a\,f\,g-b\,f\,g\,p\,q\right )}{4\,f}\right )+x\,\left (\frac {4\,a\,f\,g^3+12\,a\,e\,g^2\,h-4\,b\,f\,g^3\,p\,q}{4\,f}+\frac {e\,\left (\frac {e\,\left (\frac {h^2\,\left (a\,e\,h+3\,a\,f\,g-b\,f\,g\,p\,q\right )}{f}-\frac {e\,h^3\,\left (4\,a-b\,p\,q\right )}{4\,f}\right )}{f}-\frac {3\,g\,h\,\left (2\,a\,e\,h+2\,a\,f\,g-b\,f\,g\,p\,q\right )}{2\,f}\right )}{f}\right )+x^3\,\left (\frac {h^2\,\left (a\,e\,h+3\,a\,f\,g-b\,f\,g\,p\,q\right )}{3\,f}-\frac {e\,h^3\,\left (4\,a-b\,p\,q\right )}{12\,f}\right )-\frac {\ln \left (e+f\,x\right )\,\left (b\,p\,q\,e^4\,h^3-4\,b\,p\,q\,e^3\,f\,g\,h^2+6\,b\,p\,q\,e^2\,f^2\,g^2\,h-4\,b\,p\,q\,e\,f^3\,g^3\right )}{4\,f^4}+\frac {h^3\,x^4\,\left (4\,a-b\,p\,q\right )}{16} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g + h*x)^3*(a + b*log(c*(d*(e + f*x)^p)^q)),x)

[Out]

log(c*(d*(e + f*x)^p)^q)*((b*h^3*x^4)/4 + b*g^3*x + (3*b*g^2*h*x^2)/2 + b*g*h^2*x^3) - x^2*((e*((h^2*(a*e*h +
3*a*f*g - b*f*g*p*q))/f - (e*h^3*(4*a - b*p*q))/(4*f)))/(2*f) - (3*g*h*(2*a*e*h + 2*a*f*g - b*f*g*p*q))/(4*f))
 + x*((4*a*f*g^3 + 12*a*e*g^2*h - 4*b*f*g^3*p*q)/(4*f) + (e*((e*((h^2*(a*e*h + 3*a*f*g - b*f*g*p*q))/f - (e*h^
3*(4*a - b*p*q))/(4*f)))/f - (3*g*h*(2*a*e*h + 2*a*f*g - b*f*g*p*q))/(2*f)))/f) + x^3*((h^2*(a*e*h + 3*a*f*g -
 b*f*g*p*q))/(3*f) - (e*h^3*(4*a - b*p*q))/(12*f)) - (log(e + f*x)*(b*e^4*h^3*p*q - 4*b*e*f^3*g^3*p*q + 6*b*e^
2*f^2*g^2*h*p*q - 4*b*e^3*f*g*h^2*p*q))/(4*f^4) + (h^3*x^4*(4*a - b*p*q))/16

________________________________________________________________________________________